import { createApp } from "vue";
import App from "./App.vue";
// 全局注册element-plus
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
// @ts-ignore
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
// 引入svg
import "virtual:svg-icons-register";
// 引入全局样式
import "./styles/index.scss";
// 全局注册自定义组件
import globalComponents from "@/components";
//  全局注册路由
import router from "./router/index";
// 全局注册pinia仓库
import pinia from "./store";
// 引入路由鉴权文件
import "./permission";
// 引入暗黑模式css
import "element-plus/theme-chalk/dark/css-vars.css";

const app = createApp(App);
app.use(ElementPlus, {
  locale: zhCn
});
app.use(globalComponents);
app.use(router);
app.use(pinia);

app.mount("#app");

console.log("当前为：", import.meta.env);
